package com.xuanyuan.service.impl;

import com.xuanyuan.entity.Dept;
import com.xuanyuan.mapper.DeptMapper;
import com.xuanyuan.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class DeptServiceImpl implements DeptService {
    @Autowired
    private DeptMapper deptMapper;

    @Override
    public Dept selectDeptByName(String deptName) {
        return deptMapper.selectDeptByName(deptName);
    }

    @Override
    public Dept selectDeptById(String id) {
        return deptMapper.selectDeptById(id);
    }

    @Override
    public List<Dept> selectDeptList(Dept dept) {
        return deptMapper.selectDeptList(dept);
    }

    @Override
    public Integer insertDept(Dept dept) {
        return deptMapper.insertDept(dept);
    }

    @Override
    public Integer updateDept(Dept dept) {
        return deptMapper.updateDept(dept);
    }

    @Override
    public Integer deleteDeptByIds(String[] ids) {
        return deptMapper.deleteDeptByIds(ids);
    }
}
